﻿<%@ Page Language="C#" MasterPageFile="~/Game/GameTools/GameTool.Master" AutoEventWireup="true"
    CodeBehind="TravelTime.aspx.cs" Inherits="smallDeimos.Game.GameTools.TravelTime"
    Title="Untitled Page" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script src="../../JSFunctions.js" language="javascript" type="text/javascript" >
    function UpdateAll()
{
form1.TTSame.value = FlightTime(form1.FromSysX.value, form1.ToSysX.value, form1.FromSysY.value, form1.ToSysY.value, form1.FromPlanet.value, form1.ToPlanet.value, 1, form1.Energy.value, form1.Speed.value)
form1.TTNorm.value = FlightTime(form1.FromSysX.value, form1.ToSysX.value, form1.FromSysY.value, form1.ToSysY.value, form1.FromPlanet.value, form1.ToPlanet.value, 0, form1.Energy.value, form1.Speed.value)
}
    </script>
<%--    <script language="javascript" type="text/javascript">
function UpdateAll()
{
form1.TTSame.value = FlightTime(form1.FromSysX.value, form1.ToSysX.value, form1.FromSysY.value, form1.ToSysY.value, form1.FromPlanet.value, form1.ToPlanet.value, 1, form1.Energy.value, form1.Speed.value)
form1.TTNorm.value = FlightTime(form1.FromSysX.value, form1.ToSysX.value, form1.FromSysY.value, form1.ToSysY.value, form1.FromPlanet.value, form1.ToPlanet.value, 0, form1.Energy.value, form1.Speed.value)
}
    </script>--%>
    <table>
        <tr>
            <td colspan="4">
                From System
            </td>
            <td colspan="4">
                To system
            </td>
        </tr>
        <tr>
            <td>
                x
            </td>
            <td>
                <asp:TextBox  runat="server" id="FromSysX" >0</asp:TextBox>
            </td>
            <td>
                y
            </td>
            <td>
                <asp:TextBox  runat="server" id="FromSysY" >0</asp:TextBox>
            </td>
            <td>
                x
            </td>
            <td>
                <asp:TextBox  runat="server" id="ToSysX" >0</asp:TextBox>
            </td>
            <td>
                y
            </td>
            <td>
                <asp:TextBox  runat="server" id="ToSysY" >0</asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                From planet
            </td>
            <td>
                <asp:TextBox  runat="server" id="FromPlanet" >1</asp:TextBox>
            </td>
            <td colspan="3">
                To planet
            </td>
            <td>
                <asp:TextBox  runat="server" id="ToPlanet" >2</asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                Energy
            </td>
            <td>
                <asp:TextBox  runat="server" id="Energy" >0</asp:TextBox>
            </td>
            <td colspan="3">
                Speed
            </td>
            <td>
                <asp:TextBox  runat="server" id="Speed" title="From -4 to 4" >0</asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                TT if owner is the same
            </td>
            <td>
                <asp:TextBox  runat="server" id="TTSame" type="text" value="1" />
            </td>
            <td colspan="3">
                Normal TT
            </td>
            <td>
                <asp:TextBox  runat="server" id="TTNorm" type="text" value="1" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td colspan="3">
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                    Text="Calculate" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
